package net.sk.china.front.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 账号登录 Request
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/6/4 14:51
 * // +----------------------------------------------------------------------
 */

@Data
public class LoginRequest implements Serializable {

    private final static long serialVersionUID = 1L;

    @ApiModelProperty(value = "登录方式 account：账号密码登录 routine：微信小程序登录 sms：短信验证码登录 pc：PC端账号、密码、验证码登录", required = true)
    private String type;

    @ApiModelProperty(value = "账号 普通登录专用")
    private String account;

    @ApiModelProperty(value = "密码 普通登录专用")
    private String password;

    @ApiModelProperty(value = "前端给的code 微信小程序授权登录专用")
    private String code;

    @ApiModelProperty(value = "前端获取手机号给的iv 微信小程序授权登录专用")
    private String iv;

    @ApiModelProperty(value = "前端获取手机号给的encryptedData 微信小程序授权登录专用")
    private String encryptedData;

    @ApiModelProperty(value = "微信小程序用户头像")
    private String avatar;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "手机号 手机验证码登录专用")
    private String phone;

    @ApiModelProperty(value = "验证码 验证码登录专用")
    private String captcha;

    @ApiModelProperty(value = "验证码KEY PC端专用")
    private String key;

    @ApiModelProperty(value = "用户登录类型 routine：微信小程序 pc：PC端", required = true)
    @NotBlank(message = "用户登录类型不能为空")
    private String loginType;


}
